package test.util;

import com.lyy.JwtUtil;
import org.junit.Test;

import java.util.Map;

/**
 * @author Liangyaoyun
 */
public class JWTText {
    @Test
    public void testBuild() {
        String token = JwtUtil.build(1, "姜英博", "姜英博.jpg");
        System.out.println(token);
    }

    @Test
    public void testVerify() {
        String token = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiLnlKjmiLfnmbvlvZXorqTor4EiLCJhdmF0YXJVcmwiOiLlp5zoi7HljZouanBnIiwibmlja05hbWUiOiLlp5zoi7HljZoiLCJpc3MiOiJKb2VaaG91IiwiZXhwIjoxNjk3MzY0NTY4LCJ1c2VySWQiOjEsImlhdCI6MTY5NzI3ODE2OH0.MbwOzxHqsZ-EBH4flSEH2v52ROCXtynOM0F1r_7J4kc";
        Map<String, Object> result = JwtUtil.verify(token);
        System.out.println(result);
    }

}
